package com.ss.demo.springbootdemo.aspect;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.stereotype.Component;

import java.util.Arrays;

/**
 * 作者: MrZhangJR
 * 时间: 2021/11/3 11:40
 * 描述:
 */
@Aspect
@Component
public class CommonAspect {
//    @Around("execution (* *..controller.*.*(..))")
    public void aroundHandler(ProceedingJoinPoint pjp) throws Throwable {
        Object[] args = pjp.getArgs();
        System.out.println("aspect获取的参数: " + Arrays.toString(args));
        pjp.proceed(args);
        System.out.println("事后处理哦");
    }
}
